<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<table id="mytable">
			</table>
			<script>
				let table=document.getElementById("mytable");
				console.log(table);
				let thead=document.createElement("thead");
				table.appendChild(thead);
				let tr=document.createElement("tr");
				thead.appendChild(tr);
				let th=document.createElement("th");
				tr.appendChild(th);
				th.innerText="姓名";
				
				let th1=document.createElement("th");
				tr.appendChild(th1);
				th1.innerText="语文";
				
				let th2=document.createElement("th");
				tr.appendChild(th2);
				th2.innerText="英语";
				
				let th3=document.createElement("th");
				tr.appendChild(th3);
				th3.innerText="数学";
				
				let tbody=document.createElement("tbody");
				table.appendChild(tbody);
				let tr1=document.createElement("tr");
				tbody.appendChild(tr1);
				let td1=document.createElement("td");
				tr1.appendChild(td1);
				td1.innerText="小米";
				
				let td2=document.createElement("td");
				tr1.appendChild(td2);
				td2.innerText="80";
				
				let td3=document.createElement("td");
				tr1.appendChild(td3);
				td3.innerText="80";
				
				let td4=document.createElement("td");
				tr1.appendChild(td4);
				td4.innerText="80";
				
				let tr2=document.createElement("tr");
				tbody.appendChild(tr2);
				
				let td5=document.createElement("td");
				tr2.appendChild(td5);
				td5.innerText="小红";
				
				let td6=document.createElement("td");
				tr2.appendChild(td6);
				td6.innerText="80";
				
				let td7=document.createElement("td");
				tr2.appendChild(td7);
				td7.innerText="80";
				
				let td8=document.createElement("td");
				tr2.appendChild(td8);
				td8.innerText="80";
			</script>		
	</body>
</html>
